package com.wigem.approve.entity;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wigem.framework.common.util.common.GuidUtils;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 楼宇入驻企业填报对象 daq_enterprise
 *
 * @author DH
 * @date 2024-05-26
 */

@Data
@ApiModel
@TableName("daq_enterprise")
public class DaqEnterpriseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ApiModelProperty(value = "id", name = "id")
    @TableId
    private String id;

    /**
     * 社会信用代码
     */
    @ApiModelProperty(value = "社会信用代码", name = "socialCreditCode")
    @TableField(value = "social_credit_code")
    private String socialCreditCode;

    /**
     * 企业名称
     */
    @ApiModelProperty(value = "企业名称", name = "orgName")
    @TableField(value = "org_name")
    private String orgName;

    /**
     * 注册日期
     */
    @ApiModelProperty(value = "注册日期", name = "regTime")
    @TableField(value = "reg_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date regTime;

    /**
     * 工商注册地址
     */
    @ApiModelProperty(value = "工商注册地址", name = "orgRegAddr")
    @TableField(value = "org_reg_addr")
    private String orgRegAddr;

    /**
     * 办公用房性质
     */
    @ApiModelProperty(value = "办公用房性质", name = "useProperty")
    @TableField(value = "use_property")
    private String useProperty;

    /**
     * 租用/自用办公面积
     */
    @ApiModelProperty(value = "租用/自用办公面积", name = "officeArea")
    @TableField(value = "office_area")
    private BigDecimal officeArea;

    /**
     * 入驻时间
     */
    @ApiModelProperty(value = "入驻时间", name = "checkInTime")
    @TableField(value = "check_in_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date checkInTime;

    /**
     * 房屋租期
     */
    @ApiModelProperty(value = "房屋租期", name = "rentTime")
    @TableField(value = "rent_time")
    private String rentTime;

    /**
     * 报告期id
     */
    @ApiModelProperty(value = "报告期id", name = "reportId")
    @TableField(value = "report_id")
    private String reportId;

    /**
     * 填表人
     */
    @ApiModelProperty(value = "填表人", name = "fillPerson")
    @TableField(value = "fill_person")
    private String fillPerson;

    /**
     * 填报人联系电话
     */
    @ApiModelProperty(value = "填报人联系电话", name = "fillPhone")
    @TableField(value = "fill_phone")
    private String fillPhone;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人", name = "createUser")
    @TableField(value = "create_user")
    private String createUser;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", name = "createTime")
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 删除标记
     */
    @ApiModelProperty(value = "删除标记", name = "removeMark")
    @TableField(value = "remove_mark")
    private String removeMark;

    /**
     * 关联外键
     */
    @ApiModelProperty(value = "关联外键", name = "policyId")
    @TableField(value = "policy_id")
    private String policyId;


    //入驻企业营业执照
    @ApiModelProperty(value = "入驻企业营业执照", name = "businessLicense")
    @TableField(value = "business_license")
    private String businessLicense;

    //当年合同
    @ApiModelProperty(value = "当年合同", name = "currentYearContract")
    @TableField(value = "current_year_contract")
    private String currentYearContract;
    
    //房屋租金发票复印件
    @ApiModelProperty(value = "房屋租金发票复印件", name = "copyOfRentalInvoice")
    @TableField(value = "copy_of_rental_invoice")
    private String copyOfRentalInvoice;

    @ApiModelProperty(value = "楼宇名称", name = "estateName")
    @TableField(exist = false)
    private String estateName;

    @ApiModelProperty(value = "街道名称", name = "regionName")
    @TableField(exist = false)
    private String regionName;

    @ApiModelProperty(value = "街道id", name = "regionId")
    @TableField(exist = false)
    private String regionId;

    public void create() {
        this.id = GuidUtils.generate();
    }

    public void modify(String keyValue) {
        this.id = keyValue;
    }

}
